package org.example.utils;

/**
 * 获取用户IP地址
 */
public class RequestHolder {
    private static final ThreadLocal<String> threadLocal = new ThreadLocal<>();
    
    public static void set(String ip){
        threadLocal.set(ip);
    }
    
    public static String get(){
        return threadLocal.get();
    }
    
    public static void remove(){
        threadLocal.remove();
    }
}
